#!/usr/bin/env python

'''
Created on May 4, 2010

This is a CLI prototype to test the (Service) module.
'''

import rpyc

def main():
    
    # Connect to the server at the loopback interface.
    server = rpyc.connect('127.0.0.1', 4444)
    
    try :
        
        # Authenticate the root account, and receive the pointer.
        modules = server.root.authenticate('SCORPionabdo')
        
        # Create an Object from the NetworkConfig Class.
        x = modules.NetworkConfig.NetworkConfig()
        print x.getIP('wlan0')
    
    except Exception :
        
        # If the Authentication failed, print this message.
        print 'Authentication Failed' 
    
    # Close the connection. 
    server.close()

if __name__ == '__main__' :
    
    main()
